package service

import (
	"gorm.io/gorm"
	"template-generate/db"
)

type CommandService struct {
	db *gorm.DB
}

func (s *CommandService) List() []db.Command {
	var commands []db.Command
	s.db.Model(&db.Command{}).Order("sort_num desc").Find(&commands)
	return commands
}
